package model;

import filter.*;

import java.util.Map;
import java.util.List;

/**
 * @author Jeremy
 * 
 */
public interface IProcessModule
{

    /**
     * Sorts a data set based on the natural ordering of the elements in the
     * specified column
     * 
     * @param data
     *            : Data set to be sorted
     * @param columnNumber
     *            : Column along which to sort
     * @param ascending
     *            : True if standard order is to be used; false if reverse sort
     */
    public void sortOnColumn(List<List<Object>> data, int columnNumber,
            boolean ascending);

    /**
     * Applies a specified list of filters in sequential order (different
     * orderings may produce semantically different results) to a given data set
     * and returns a (potentially) modified copy.
     * 
     * @param data
     *            : Data set to filter on
     * @param filters
     *            : Filters to be applied, in order
     * @return Modified copy of the data set after filters have been applied
     */
    public Map<Object, List<Object>> applyFilters(
            Map<Object, List<Object>> data, List<IFilter<?, ?>> filters);

}
